<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/include/taglibs.jsp" %>
<script src="${path}/static/taoshunda/paramstype/paramstype.js"></script>
<link href="${path}/static/css/public/public.css" rel="stylesheet" type="text/css">

<div class="clearfix">
    <%--<div class="form-inline" role="form" id="depotToolbar" data-visible="false" style="float: left; margin-right: 20px">--%>
        <%--<button type="button" style="margin-bottom:8px;background-color: #3c8dbc;color: snow;border-radius:6px;"--%>
                <%--class="btn " id="addWear">--%>
            <%--添加参数--%>
        <%--</button>--%>
    <%--</div>--%>

    <div class="input-group col-xs-2" style="float: left;margin-right: 6px;">
        <input type="text" class="form-control entry" name="paramName" id="paramsName" placeholder="请输入参数名称"
               style="float: left">
    </div>

    <div style="float: left;">
        <button type="button" class="btn " id="btnsearch" style="margin-bottom:8px;background-color: #3c8dbc;color: snow;border-radius:6px;">
            <%--<span class="glyphicon glyphicon-search" aria-hidden="true"></span>--%>
            查询
        </button>
    </div>
</div>

<div id="path" style="margin-top: 15px;">
    <input type="hidden" class="glyphicon glyphicon-plus" id="typeId">
    <span class="path" data-id="0" onclick="clearPathClick(0)">参数首页:&nbsp;&nbsp;</span>
</div>


<table id="table"
       class="table table-striped table-bordered"
       data-toggle="table"
       data-url="${path}/web/parameter/paramsType"
       data-toolbar="#toolbar"
       data-side-pagination="server"
       data-pagination="true"
       data-page-list="[5, 10, 20, 50, 100, 200]"
>
    <thead>
    <tr>
        <th data-formatter="Category.nameFormatters" data-events="operateEvents">参数名称</th>
        <th data-field="remark">参数描述</th>
        <th data-formatter="valueFormatter">参数值</th>
        <%--<th data-field="remark" data-visible="false">介绍</th>--%>
        <th data-field="created">创建时间</th>
        <th data-formatter="paramstypeFormatter" data-events="paramstypeEvent">操作</th>
    </tr>
    </thead>
</table>


<div id="addParameterType-div" class="slidingmenu box-model box box-info">

    <div class="box-header">
        <h3 class="box-title">添加参数</h3>
    </div>
    <div class="box-body">
        <form role="form" action="${path}/web/parameter/saveOrUpdate" method="post" id="addParameterType">
            <div class="form-group">
                <label>参数名称:</label>
                <input type="text" class="form-control" name="name" value="" id="parameterTypeName">
            </div>
            <div class="form-group">
                <label>参数描述:</label>
                <input type="text" class="form-control" name="descri" value="" id="parameterTypeDesc">
            </div>
        </form>
    </div>
    <div class="box-footer">
        <button class="btn btn-info" data-event="submit-addParameterTypeSave">添加</button>
        &nbsp;
        <button class="btn btn-danger close-model">关闭</button>
    </div>

</div>


<div id="addParameter-div" class="slidingmenu box-model box box-info">

    <div class="box-header">
        <h3 class="box-title">添加参数</h3>
    </div>
    <div class="box-body">
        <form role="form" action="${path}/web/parameter/saveOrUpdate" method="post" id="addParameter">

            <div class="form-group">
                <label>参数名称:</label>
                <input type="text" class="form-control" name="name" value="" id="addParameterName">
            </div>
            <div class="form-group">
                <label>参数值:</label>
                <input type="text" class="form-control" name="value" value="" id="addParameterValue">
            </div>
            <div class="form-group">
                <label>介绍:</label>
                <input type="text" class="form-control" name="remark" value="" id="addParameterRemark">
            </div>
            <input type="hidden" id="typeid2" name="typeId"/>
        </form>
    </div>
    <div class="box-footer">
        <button class="btn btn-info" data-event="submit-addParameterSave">添加</button>
        &nbsp;
        <button class="btn btn-danger close-model">关闭</button>

    </div>
</div>

<div id="editparamstype-div" class="slidingmenu box-model box box-info">
    <div class="box box-info">
        <div class="box-header">
            <h3 class="box-title">编辑</h3>
        </div>
        <div class="box-body">
            <form role="form" action="${path}/web/parameter/saveOrUpdate" method="post" id="editparamstype">
                <input type="hidden" value="" name="id"/>

                <div class="form-group">
                    <label>参数名称:</label>
                    <input type="text" class="form-control" name="name" value="" required="required">
                </div>
                <div class="form-group">
                    <label>参数描述:</label>
                    <input type="text" class="form-control" name="descri" id="remark" required="required">
                </div>
                <div class="box-footer">
                    <button class="btn btn-info" id="saveeditparamstype">确定</button>
                    &nbsp;
                    <button class="btn btn-danger close-model">关闭</button>
                </div>
            </form>
        </div>
    </div>
</div>

<div id="editparams-div" class="slidingmenu box-model box box-info">
    <div class="box box-info">
        <div class="box-header">
            <h3 class="box-title">修改参数</h3>
        </div>
        <div class="box-body">
            <form role="form" action="${path}/web/parameter/saveOrUpdate" method="post" id="editparams">
                <input type="hidden" id="id" name="id"/>
                <input type="hidden" name="typeId"/>

                <div class="form-group">
                    <label>参数值:</label>
                    <input type="text" class="form-control" name="value" id="value" required="required">
                </div>
                <div class="box-footer">
                    <button class="btn btn-info" id="saveeditparams">确定</button>
                    &nbsp;
                    <button class="btn btn-danger close-model">关闭</button>
                </div>
            </form>
        </div>
    </div>
</div>